package com.seckill.system.api;

import com.seckill.common.core.constant.ServiceNameConstants;
import com.seckill.system.api.domain.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteTbUserService", value = ServiceNameConstants.USER_SERVICE)
public interface RemoteTbUserService {

    @GetMapping("/tb-user/login")
    public TbUser login(@RequestParam("phone")String phone);

    //获取登录的用户id
    @GetMapping("/tb-user/getUserId")
    public Long getUserId(@RequestParam("token")String token);

    //获取登录的用户信息
    @GetMapping("/tb-user/getUser")
    public TbUser getUser(@RequestParam("token")String token);
}
